package com.example.teesystem.entityDto;

import com.example.teesystem.common.utils.TimeUtil;
import com.example.teesystem.entity.ExamEvaluation;
import com.example.teesystem.entity.ExamPaper;
import lombok.Data;

/**
 * @author : NieYaShi
 * @version : v1.0
 * @createTime : 2022/4/27 10:18
 */
@Data
public class StudentMarkedPaperList {
    private Integer paperId;
    private String paperName;
    private String examTime;
    private Integer score;

    public StudentMarkedPaperList(ExamPaper examPaper, ExamEvaluation examEvaluation){
        this.paperId = examPaper.getId();
        this.paperName = examPaper.getName();
        this.examTime = TimeUtil.dateTimeToString(examPaper.getStartTime());
        this.score = examEvaluation.getScore();
    }
}
